package com.huice.seller.dao;

import com.huice.seller.pojo.vo.ForwarderSupplierVO;
import org.springframework.stereotype.Repository;

import java.util.List;

import static com.huice.seller.db.tables.BaseBusinessInfo.BASE_BUSINESS_INFO;

/**
 * @Description TODO
 * @Author 赵凯
 * @Date 2021/7/19 13:21
 **/
@Repository
public class SupplierDaoImpl extends BaseDao{


    public List<ForwarderSupplierVO> selectAllSuppliers() {
        List<ForwarderSupplierVO> forwarderSupplierVOS = db.select(BASE_BUSINESS_INFO.BUSINESS_NAME, BASE_BUSINESS_INFO.CITY_NAME, BASE_BUSINESS_INFO.CITY_CODE, BASE_BUSINESS_INFO.FLOOR_NAME,
                BASE_BUSINESS_INFO.FLOOR_CODE, BASE_BUSINESS_INFO.ID, BASE_BUSINESS_INFO.MARKET_NAME, BASE_BUSINESS_INFO.MARKET_CODE,
                BASE_BUSINESS_INFO.BUSINESS_TOTAL_NAME).from(BASE_BUSINESS_INFO).fetchInto(ForwarderSupplierVO.class);
        return forwarderSupplierVOS;
    }
}
